home *** CD-ROM | disk | FTP | other *** search
- > I have 2 questions on the 1.1 winsock spec regarding FD_WRITE.
- > First, if a winsock client calls WSAAsyncSelect a second time, will
- > an FD_WRITE message be sent to the client (assuming readiness for
- > writing)?
-
- Yes.
-
- > Second, why are send() and sentto() listed as re-enabling functions
- > for FD_WRITE (on p. 90)? Each time send() is called the winsock
- > library is not supposed to post an FD_WRITE message, right? Only
- > after a send() or sentto() fails, and then buffer space becomes
- > available, was my understanding. Just wanted to make sure...
-
- You're understanding of it is correct. It has reenabling functions
- because the FD_WRITE event is "level-triggered" just like all the
- other events. Here's an example of how/when it works:
-
- - you send() successfully
- - you send() successfully
- ...
- - send() fails with WSAEWOULDBLOCK
- ...
- - WinSock DLL sends FD_WRITE to notify you that buffers are again
- available (so you should be able to send() successfully).
- ...
- - You're busy doing other things, or haven't got the message yet
- ...
- - More buffers become available to the WinSock DLL but it DOESN'T
- send another FD_WRITE message to you, because you haven't called
- the "re-enabling function".
-
- - you send() successfully...
-
- Granted, it's not as important as the "level triggering" is for
- other events, but that's not to say it isn't important.
-
- Regards,
- --
- Bob Quinn rcq@ftp.com
- FTP Software, Inc. No. Andover, MA
-
-